//
// Created by Scave on 2025/8/25.
//

#ifndef RIDER3D_SCENEMANAGER_H
#define RIDER3D_SCENEMANAGER_H

#include "Define.h"
#include "Scene.h"
#include "SceneRenderer.h"

NS_RIDER_BEGIN

    class SceneManager {
    public:
        explicit SceneManager();

        ~SceneManager();

        Scene* CreateScene();

        Scene* CreateScene(const Name& name);

        Scene* GetCurrentScene();

        Scene* FindScene(const Name& name);

        Scene* operator[](const Name& name);

        void LoadScene(Scene* scene);

        void LoadScene(const Name& name);

        void SetRenderConfig(RenderConfig config);

        void Flush();

    private:
        Scene* current_scene_ = nullptr;
        std::vector<Scene*> scene_list_;
        SMART_PTR<SceneRenderer> renderer_;
    };

NS_RIDER_END

#endif //RIDER3D_SCENEMANAGER_H
